//
// Created by 先通明 on 2018/8/24.
//
#include <time.h>      // for time()
#include <stdbool.h>
#include "queue.h"

#ifndef CPRIMERPRACTICE_BOOTH_H
#define CPRIMERPRACTICE_BOOTH_H
typedef struct booth {
    int hours;                // hours of simulation//模拟排队时间
    int perhour;              // average # of arrivals per hour //平均每小时的顾客
    long turnaways;       // turned away by full queue //走开的人数（队列满了时来的人）
    long customers;       // joined the queue //顾客总数（包含走开的)
    long served;          // served during the simulation //接待的顾客总数
    long sum_line;        // cumulative line length // 积累的排队人数
    double min_per_cust;      // average time between arrivals //平均多少分钟来一个准备质询的人
    long line_wait;       // cumulative time in line //顾客得到质询消耗的时间总和
} Booth;

void intilizeBooth(Booth *booth,int hours,int perhour);
// 开始质询
void start_booth(Booth *booth);
//显示模拟的结果
void show_booth(Booth *booth);

bool newcustomer(double x);   // is there a new customer?
Item customertime(long when); // set customer parameters

#endif //CPRIMERPRACTICE_BOOTH_H
